export default {
  namespaced: true,
  state: {
    color: '#304156',
    activecolor: '#ffd04b',
    switchcolor: 'ffd04b',
    anniucolor:'#1E90FF',
    showlogo: true, //value4
    showheader: true, //value3
    showtitle: true, //value1
    showtopbar: false, //value2
    showroutertitle: false, //value5
  },
  mutations: {
    changecolor(state) {
      state.color = '#fff'
    },
    changecolor2(state) {
      state.color = '#304156'
    },
    changeactivecolor(state, paylod) {
      state.activecolor = paylod
      state.anniucolor = paylod
    },
    changeswitchcolor(state, paylod) {
      state.switchcolor = paylod
    },
    changeshowlogo(state, paylod) {
      state.showlogo = paylod
    },
    changeshowheader(state, paylod) {
      state.showheader = paylod
    },
    changeshowtitle(state, paylod) {
      state.showtitle = !paylod
    },
    changeshowtopbar(state, paylod) {
      state.showtopbar = paylod
    },
    changeshowroutertitle(state, paylod) {
      state.showroutertitle = paylod
    },
    cunbendi(state, pyload) {
      localStorage.setItem('style', JSON.stringify(state))
      window.location.reload()
    },
    changestyle(state, paload) {
      state.color = paload.color
      state.activecolor = paload.activecolor
      state.switchcolor = paload.switchcolor
      state.showlogo = paload.showlogo
      state.showheader = paload.showheader
      state.showtitle = paload.showtitle
      state.showtopbar = paload.showtopbar
      state.showroutertitle = paload.showroutertitle
      state.anniucolor = paload.anniucolor
    },
  },
}
